/**
 * $version:  0.1 
 * $Date: 2011-01-21 
 *
 * Copyright (C) 2010-2011 Jawa Software. All rights reserved.
 *
 */

package org.jawa.util;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.jawa.user.User;

/**
 * 
 */
public class WebManager extends WebBean {

	private static final Logger Log = LoggerFactory.getLogger(WebManager.class);

    public WebManager() {
    }


    /**
     * Returns the page user or <tt>null</tt> if one is not found.
     */
    public User getUser() {
    	User pageUser = null;
        try {
            pageUser = (User) session.getAttribute(JawaConstants.USER_KEY);
        }
        catch (Exception ignored) {
            // 忽略.
        }
        return pageUser;
    }

    private void sleep() {
        // Sleep for a minute:
        try {
            Thread.sleep(3000L);
        }
        catch (Exception ignored) {
            // Ignore.
        }
    }

}